<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.3/jquery.js"></script>
<script>
    $.ajax({
        url: "https://suggest.taobao.com/sug?code=utf-8&q=水杯",
        method: 'get',
        // jsonp跨域
        dataType: 'jsonp',
        success(res) {
            console.log(res);
        }
    })

// 注意： jsonp跨域 只能跨get请求
</script>

</html>